<?php
    $this->headTitle('Danh mục','append');
?>
<div class="dashboard-menu dashboard-admin">
    <span class="back">&nbsp;</span>
    <h1>Dự án</h1>
        <?php if($this->acl->checkAllowed(array('moduleName'=>'admin','controllerName'=>'district','actionName'=>'add'))){ ?>
            <a class="btn btn-danger" href="<?php echo $this->url(array('module'=>'admin', 'controller'=>'district', 'action'=>'add'));?>">
                Thêm mới
            </a>
        <?php } ?>                        
</div>
<div class="row placeholders">
    <div class="col-md-12">
        <div class="widget-big">
            <div class="table table-responsive">
                <div class="search-result">
                    <table class="table table-bordetext-danger table-striped table-condensed table-hover" border="0" cellspacing="0" cellpadding="0">
                        <thead>
                            <tr class="warning">
                                <th style="width:10%;">ID</th>
                                <th style="width:20%;">Tên dự án</th>
                                <th style="width:10%;">Quận/Huyện</th>
                                <th style="width:10%;">Tỉnh/Thành Phố</th>                                                                
                                <th style="width:10%;">C.Năng</th>
                            </tr>
                        </thead>
                        <tbody>
                        <?php
                            foreach ($this->districtList as $dis){
                        ?>
                            <tr>
                                <td style="width:10%;" class="text-left"><?=$dis['projectId'];?></td>
                                <td style="width:20%;" class="text-left">
                                <?php if($this->acl->checkAllowed($this->auth,'admin','project','edit')){ ?>
                                    <a href="<?php echo $this->url(array('module'=>'admin', 'controller'=>'project', 'action'=>'edit', 'projectId'=>$dis['projectId']));?>" title="Sửa thông tin dự án">
                                        <?php echo $dis['projectName']; ?>
                                    </a>
                                <?php }else{ ?>
                                    <span class="blue"><?php echo $dis['projectName']; ?></span>
                                <?php } ?>
                                </td>
                                <td style="width:10%;" class="text-left"><?=$dis['districtName'];?></td>
                                <td style="width:10%;" class="text-left"><?=$dis['provinceName'];?></td>                                                                                                                                                                                                                           
                                <td style="width:10%;" class="text-left">
                                <?php if($this->acl->checkAllowed(array('moduleName'=>'admin','controllerName'=>'company','actionName'=>'edit'))) ?>                                    
                                    <a class="glyphicon glyphicon-pencil" href="<?=$this->url(array('module'=>'admin', 'controller'=>'project', 'action'=>'edit', 'projectId'=>$dis['projectId']))?>" title="Sửa thông tin dự án"></a>
                                    &nbsp;&nbsp;                                    
                                <?php if($this->acl->checkAllowed(array('moduleName'=>'admin','controllerName'=>'company','actionName'=>'delete'))) ?>                                    
                                    <a class="glyphicon glyphicon-remove" href="<?=$this->url(array('module'=>'admin', 'controller'=>'project', 'action'=>'delete', 'projectId'=>$dis['projectId']))?>" title="Xoá dự án"></a>                                    
                                </td>
                            </tr>
                        <?php
                            } 
                        ?>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="clearfix"></div>
        </div>
        <div class="widget-big">
            <div class="search-result text-left">                
                <form id="admin" name="admin" enctype="multipart/form-data" action="admin/project/synchronize" method="post"><dl class="zend_form">
                    <dt><label>Tải về</label></dt>
                    <dd>
                        <a class="glyphicon glyphicon-download-alt" href="<?=$this->url(array('module'=>'admin', 'controller'=>'project', 'action'=>'export'))?>" title="Xuất database"> (Click here)</a><br /><br />
                    </dd>
                    <dt><label for="logo" class="optional">Đồng bộ file Excel</label></dt>
                    <dd>
                        <input type="hidden" name="MAX_FILE_SIZE" value="2097152" id="MAX_FILE_SIZE"/>
                        <input type="file" name="project" id="project" size="60"/>
                    </dd>
                    <dd id="submit-element">
                        <input type="submit" name="submit" id="submitbutton" value="Đồng bộ" class="button medium"/>
                    </dd>
                </dl></form>                  
            </div>
            <div class="clearfix"></div>
        </div>
    </div>
</div>